package com.suning.sawp.dto.common;

import java.io.Serializable;
import java.util.List;

import com.google.gson.annotations.Expose;

/**
 * 〈一句话功能简述〉<br>
 * 〈功能详细描述〉
 * 
 * @author 12061748
 * @see [相关类/方法]（可选）
 * @since [产品/模块版本] （可选）
 */
public class RecordList<T> implements Serializable {
    /**
     * 序列化
     */
    private static final long serialVersionUID = 4996760246791339777L;
    @Expose
    private List<T> rows;
    @Expose
    private int total;

    public RecordList(List<T> rows, int total) {
        this.rows = rows;
        this.total = total;
    }

    public RecordList(List<T> rows) {
        this.rows = rows;
        if (null != rows) {
            this.total = rows.size();
        }
    }

    public List<T> getRows() {
        return rows;
    }

    public void setRows(List<T> rows) {
        this.rows = rows;
    }

    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }
}
